<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="__PUBLIC__/Admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/lib/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="__PUBLIC__/Admin/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]--><title>权限组编辑</title>
</head>
<body>
<div class="pd-20">
  <form class="Huiform" id="form-role-add" action="{:U('admin/group/edit')}" method="post">
    <table class="table table-border table-bordered table-bg">
      <tbody>
        <tr>
          <th class="text-r" width="80">权限组名称：</th>
          <td>
            <input name="rolegroup" type="text" class="input-text" id="" value="<?php echo $res['title'] ?>" datatype="*1-20" nullmsg="权限组名称不能为空！"> 
            <input type="hidden" name="id" value="<?php echo $res['id'] ?>">
          </td>
        </tr>
        <tr>
          <th class="text-r va-t">规则列表：</th>
          <td>
            <table class="table table-border table-bordered table-bg">
              <tbody>
              <?php var_dump($res) ?>
                <?php foreach ($categoryData as $v) { ?>
                  <tr>
                    <th width="70"><?php echo $v['cname'] ?></th>
                    <td class="permission-list">
                      <div class="cl">
                        <?php foreach ($v['son'] as  $son) { ?>
                           <label class="item"><input name="rules[]" type="checkbox" <?php if (in_array($son['id'], explode(',', $res['rules']))) {
                             echo 'checked';
                           } ?> value="<?php echo $son['id'] ?>"><?php echo $son['title'] ?></label>
                        <?php } ?>
                      </div>
                    </td>
                  </tr>
                <?php } ?>
              </tbody>
            </table>
          </td>
        </tr>
        <tr>
          <th class="text-r va-t">描述：</th>
          <td><textarea name="introduce" class="textarea" id="introduce" placeholder="描述下权限组所具有的权限"></textarea> 
          </td>
        </tr>
        
        <tr>
          <th></th>
          <td>
            <button type="submit" class="btn btn-success radius" id="save" name="save"><i class="icon-ok"></i> 确定</button>
          </td>
        </tr>
      </tbody>
    </table>
  </form>
</div>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/lib/Validform_v5.3.2.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/lib/layer1.8/layer.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/lib/laypage/laypage.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.admin.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.admin.doc.js"></script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d911";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F080836300300be57b7f34f4b3e97d911' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>